package com.woniuxy.joylife.manager.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.woniuxy.joylife.manager.dao.PunishmentDao;
import com.woniuxy.joylife.manager.entity.PunishmentEntity;
import com.woniuxy.joylife.manager.service.PunishmentService;
import com.woniuxy.joylife.manager.utils.PageUtils;
import com.woniuxy.joylife.manager.utils.Query;
import org.springframework.stereotype.Service;

import java.util.Map;


@Service("punishmentService")
public class PunishmentServiceImpl extends ServiceImpl<PunishmentDao, PunishmentEntity> implements PunishmentService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<PunishmentEntity> page = this.page(
                new Query<PunishmentEntity>().getPage(params),
                new QueryWrapper<PunishmentEntity>()
        );

        return new PageUtils(page);
    }

}